home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4049 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: GIMLI.genias.de!usenet
  2. From: Andreas Haas <andreas>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: E-mail from within a Program
  5. Date: 1 Feb 1996 15:49:03 GMT
  6. Organization: GENIAS Software GmbH
  7. Message-ID: <4eqndf$gj0@GIMLI.genias.de>
  8. References: <4eoepe$kov@serveru1.naic.wpafb.af.mil>
  9. NNTP-Posting-Host: thorin.genias.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.2 sun4c)
  14. X-URL: news:4eoepe$kov@serveru1.naic.wpafb.af.mil
  15.  
  16. Hello Keith,
  17.  
  18. your problem is that the "<" must be evaluated by a shell.
  19. So start a shell, that starts your command line arguments
  20. including the file redirection.
  21.  
  22. - first build up your argv[] for the execlp() 
  23. - fork() a new process
  24. - execlp() your argv[]
  25. - I think you will have to call wait3() to 
  26.   wait for the finish of your child process
  27.  
  28. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  29.                         Andreas Haas
  30. GENIAS Software GmbH             | Email:  andreas@genias.de
  31. Erzgebirgstr. 2 B                | Tel.:   ++49 +9401 9200-0/41
  32. D-93073 Neutraubling/Germany     | FAX:    ++49 +9401 9200-92
  33. http://www.genias.de/            |
  34. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  35.  
  36.